package com.apimarket.dao;

import com.apimarket.entity.vo.Node;
import com.apimarket.entity.vo.SysRoleMenuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

//角色菜单关系
@Repository
public interface SysRoleMenuMapper {
    //根据menuId删除role_menu(sys_role_menu)表中数据
   int deleteObjectsByMenuId(@Param("id")Integer menuId);

   //基于角色id删除角色菜单关系
    int deleteObjectsByRoleId(Integer roleId);

    int insertObjects(
            @Param("roleId")Integer roleId,
            @Param("menuIds")Integer[] menuIds);


    List<Integer> findMenuIdsByRoleIds(List<Integer> roleIds);
}
